home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / net / bind-contrib.tar.gz / bind-contrib.tar / contrib / nutshell / h2n.man < prev    next >
Encoding:
Text File  |  1996-10-25  |  6.3 KB  |  168 lines

  1. NAME
  2.  
  3.     h2n - Translate host table to name server file format
  4.  
  5. SYNOPSIS
  6.  
  7.     h2n -d DOMAIN -n NET [options]
  8.  
  9. DESCRIPTION
  10.  
  11.     h2n translates /etc/hosts to DNS files and creates a BIND boot file.
  12.     This tool can be run once or many times.  After converting your host
  13.     table to DNS format, you can manually maintain the DNS files, or you
  14.     can maintain the host table and run h2n each time you modify
  15.     /etc/hosts.  h2n automatically increments the serial number in each DNS
  16.     file when it makes a new one.
  17.  
  18.     h2n generates files starting with the prefix "db."  These are called
  19.     "db files."  The domain data is stored in a file called db.DOMAIN,
  20.     where DOMAIN is the first label in your domain name (given with the -d
  21.     option).  The address-to-name data is stored in files named db.NET,
  22.     where NET is a network number (given with the -n option).
  23.  
  24.     Each time h2n is run, it generates the DNS files from scratch.  Any
  25.     changes you manually made to the DNS files are lost.  If you'd like to
  26.     add resource records to a db file generated by h2n, put your RRs in a
  27.     file prefixed with "spcl" instead of "db".  h2n will include this
  28.     file's data by adding a $INCLUDE directive to the end of the db file.
  29.  
  30.     By default, h2n will generate an MX record with a weight of 10 that
  31.     points to the host itself as the mail exchanger.  MX records can be
  32.     suppressed with -M.  Additional MX records can be added with -m.  To
  33.     suppress generating the default MX record for a host, include "[no
  34.     smtp]" in that host's host table comment.
  35.  
  36.     By default, h2n will create a boot file, ./boot.cacheonly, for a
  37.     caching only name server.  If either of the -z or -Z options are used,
  38.     h2n creates a boot file, named ./boot.sec.save or ./boot.sec
  39.     respectively, for a secondary name server.
  40.  
  41.     If you are running BIND 4.9.3 or later and you'd like to add boot 
  42.     file directives to the boot files, put your directives in a file 
  43.     called "spcl.boot" (for the primary and secondary server boot files)
  44.     or "spcl.cacheonly" (for a caching only server boot file).  h2n will 
  45.     include this file's data by adding a "include" directive to the end 
  46.     of the boot file.
  47.  
  48.     Options are:
  49.  
  50.         -b BOOTFILE
  51.         Use BOOTFILE instead of the default: ./named.boot.
  52.  
  53.     -c REMOTE-DOMAIN
  54.         Create CNAME records in the default domain for all the
  55.         hosts in REMOTE-DOMAIN.  Including more than one -c option 
  56.                 is allowed.  This is intended for creating CNAME records
  57.                 in DOMAIN that point to names in REMOTE-DOMAIN.
  58.  
  59.     -d DOMAIN
  60.         Your domain name is DOMAIN.  Only 1 -d option is allowed.
  61.                 To build data for multiple domains, run h2n multiple times,
  62.                 once for each domain.  For multiple domains, you have to
  63.                 provide your own boot file since the boot file made by
  64.                 h2n will only match the arguments for the last time h2n
  65.                 was run.
  66.  
  67.     -e DOMAIN
  68.         Eliminate all lines from the host table with names in
  69.         DOMAIN.  Including more than one -e option is allowed.
  70.  
  71.     -f FILE
  72.         Command line options are in a file called FILE.  This
  73.         option cannot be used within FILE.
  74.  
  75.     -h HOST
  76.         Use HOST in the fields of the SOA record that require a
  77.         hostname.  The default is the host on which you run h2n.
  78.  
  79.     -m WEIGHT:MX-HOST
  80.         Include an MX record for each host in your domain pointing
  81.         to MX-HOST at WEIGHT.  Including more than one -m option is
  82.         allowed.  Example:  -m 10:terminator.movie.edu -m
  83.         20:wormhole
  84.  
  85.     -n NET[:SUBNETMASK]
  86.         NET is your network number without the trailing zeros.
  87.         Including more than one -n option is allowed.  If
  88.         SUBNETMASK is provided, create data for each subnet of NET.
  89.         Example:  -n 192.249.249 -n 15.15.16:255.255.248.0
  90.  
  91.     -o REFRESH:RETRY:EXPIRE:MINIMUM
  92.         Change the default SOA values (10800:3600:604800:86400) to
  93.         the values provided.
  94.  
  95.     -s SERVER
  96.         List SERVER in each domain's NS records.  Including more
  97.         than one -s option is allowed.
  98.  
  99.     -t      Generate TXT records from the host table comments.  If "[no
  100.         smtp]" appears in a comment, it is ignored.
  101.  
  102.     -u USER
  103.         Use USER in the SOA mail address instead of root.  USER can
  104.         be a complete mail address as in:  me@a.b.c.
  105.  
  106.     -w      Generate WKS records that list the SMTP service over the
  107.         TCP protocol if an MX record is also created.
  108.  
  109.         -y      Use the date to create the serial number.  The date format
  110.                 used is YYYYMMDDXX.  YYYY is the year.  MM is the month.
  111.                 DD is the day of the month.  XX is counter that starts at
  112.                 00 and increments each time h2n is run on the same day.
  113.                 The date-based serial number must be larger than the existing
  114.                 serial number for the date-based serial number to be used.
  115.  
  116.     -z ADDRESS
  117.         Create a boot file, ./boot.sec.save, for a secondary name
  118.         server that lists ADDRESS as the master to load from.  Save
  119.         a copy of the domain data in a backup file.  (This option
  120.         is similar to the -Z option.)
  121.  
  122.     -C COMMENT-FILE
  123.         Create resource records by using keys in the host table
  124.         comment field as indices into COMMENT-FILE.  COMMENT-FILE
  125.         contains "key:resource record" pairs like:  "720:IN HINFO
  126.         hp9000s720 hp-ux".  When h2n encounters "720" in the
  127.         comment section of the host table, it creates a resource
  128.         record by replacing the "720:"  with the host's canonical
  129.         name.
  130.  
  131.     -H HOSTFILE
  132.         Use HOSTFILE instead of /etc/hosts.
  133.  
  134.     -M      Don't generate MX records.
  135.  
  136.     -N SUBNETMASK
  137.         Apply SUBNETMASK to all network numbers instead of listing
  138.         each subnet with -n.  Specifying a subnet mask with -n
  139.         overrides the -N subnet mask for that network only.
  140.  
  141.     -Z ADDRESS
  142.         Create a boot file, ./boot.sec, for a secondary name server
  143.         that lists ADDRESS as the master to load from.  Do not save
  144.         a copy of the data in a backup file.  (This option is
  145.         similar to the -z option.)
  146.  
  147. EXAMPLES
  148.  
  149.     Create name server data for networks 192.249.249 and 192.253.253 in
  150.     movie.edu.
  151.  
  152.     h2n -d movie.edu -n 192.249.249 -n 192.253.253
  153.  
  154.     Create name server data for networks 192.249.249 and 192.253.253 in
  155.     movie.edu.  Eliminate lines in the host table that contain fx.movie.edu
  156.     and include MX records for all hosts pointing to the mail hub,
  157.     postmanrings2x.movie.edu.  Include all of the options in a file.
  158.  
  159.     h2n -f option_file
  160.  
  161.     option_file contains the following lines:
  162.  
  163.     -d movie.edu
  164.     -n 192.249.249
  165.     -n 192.253.253
  166.     -e fx.movie.edu
  167.     -m 50:postmanrings2x.movie.edu
  168.